<form name="form_admin" method="POST" action="<?php echo formEditAction()?>" enctype="multipart/form-data" onsubmit="return CheckForm(this)">
<input type="hidden" name="id" value="<?php echo $id?>" />
<input type="hidden" name="opt" value="" />
<fieldset class="col1">
    <legend>Base</legend>
    <table width="100%">
    <tr>
       <td width="25%"><b><font color="Red"><?php echo _URL?></font></b></td>
        <td>
            <input class="normal" type="text" name="URL" value="<?php echo $tour["cUrlString"] ?>" />
        </td>
    </tr>
	<tr>
        <td width="13%"><strong><?php echo _NAME?></strong></td>
        <td>
            <input class="normal" type="text" name="Name"  value="<?php echo $tour['cName']?>" />
        </td>
    </tr>

    <tr>
        <td width="13%"><strong><?php echo Code?></strong></td>
        <td>
            <input class="normal" type="text" name="Code" value="<?php echo $tour["cCode"] ?>" />
        </td>
    </tr>


    <tr>
        <td><b>Tour Type</b></td>
        <td>
	        <select name="ParentId" id="ParentId">
	        	<?php echo ListTourTypeOption($tour["iParentId"])?>
	        </select>
		</td>
    </tr>
    
    <tr>
        <td><b>Location</b></td>
        <td>
            <select name="LocationId">
                <?php echo ListLocationOption($tour['iLocationId'])?>
            </select>
		</td>
    </tr>
    
    <tr>
        <td><b>Location 2</b></td>
        <td>
            <select name="LocationId2">
                <?php echo ListLocationOption($tour['iLocationId2'])?>
            </select>
		</td>
    </tr>

    <tr>
        <td><b><?php echo Status?></b></td>
      <td>
	        <select name="Status" id="Status">
	        	<?php echo liststatus( $tour["iStatus"])?>
	        </select>
            &nbsp;&nbsp;&nbsp;
            <strong>Order</strong>
            <?php echo getOrderInput()?>
      </td>
    </tr>

	<?php
	if($hasTag)
	{
	?>
    <tr>
      <td><b><?php echo _TAGS?></b></td >
      <td><input type="text" id="Tag" name="Tag" class="normal" value="<?php echo $tag["cTag"]?>"/></td>
    </tr>
	<?php
	}
	?>

    <tr>
      <td><strong><?php echo _INTROIMAGE?></strong></td>
      <td>
            <?php echo inputFile('ImgIntro',$tour["cImage"])?>
      </td>
    </tr>

    <?php
	if(HAS_BANNER==true)
	{
	?>
    <tr>
        <td><b><?php echo _BANNERIMAGE?></b></td>
      <td>
	  	    <?php echo inputFile('ImgBanner',$tour["cBanner"],'banner')?>
		</td>
    </tr>
    <?php
	}
	?>
    
    <?php
	if(HAS_BACKGROUND==true)
	{
	?>
    <tr>
        <td><b>Background Image</b></td>
        <td>
            <?php echo inputFile('ImgBackground',$tour["cBackground"],'background')?>
        </td>
    </tr>
    <?php
	}
	?>

    </table>
</fieldset>

<fieldset class="col2">
    <legend>Meta</legend>
    <table width="100%">
     <tr>
        <td width="30%"><b><?php echo _METATITLE?></b></td>
        <td>
            <input class="normal" type="text" name="MetaTitle" value="<?php echo $tour['cMetaTitle'] ?>" />
        </td>
    </tr>

    <tr>
        <td><b><?php echo _METAKEYWORDS?></b></td>
        <td>
            <input class="normal" type="text" name="MetaKeywords" value="<?php echo $tour['cMetaKeywords']?>"  />
        </td>
    </tr>

    <tr>
        <td valign="top"><b>Meta Description</b></td>
        <td><textarea style="height:105px; " class="noeditor"
		 name="MetaDescription" ><?php echo $tour["cMetaDescription"] ?></textarea></td>
	</tr>
    </table>

</fieldset>

<div class="clear ptop"></div>

<fieldset>
    <legend>Tour</legend>
    <table width="100%" cellpadding="0" cellspacing="0">
    <tr>
        <td><b><?php echo Days?></b></td>
      <td>
        <input class="normal3" type="text" name="Days" value="<?php echo $tour["cDays"] ?>" />
       </td>
    </tr>

    <tr>
      <td><b>HighLights</b></td>
      <td>
      <input class="normal3" type="text" name="HighLights" value="<?php echo $tour["cHighlights"] ?>" style="width:60%"/>
      </td>
    </tr>
    
    <tr>
      <td><b>Price From</b></td>
      <td>
      <input class="normal3" type="text" name="PriceFrom" value="<?php echo $tour["cPriceFrom"] ?>" style="width:60%"/>
      </td>
    </tr>

	<tr>
      <td ><b>Summary</b></td>
      <td>
        <textarea style="height:80px; width:90%;" id="Summary " 
            name="Summary"><?php echo $tour["cSummary"] ?></textarea>
    </tr>

    <tr>
        <td><b>Full itinerary</b></td>
        <td style="padding-bottom:8">
			<textarea style="height:80px; width:90%;" id="FullItinerary " 
            name="FullItinerary"><?php echo $tour["cFullItinerary"] ?></textarea>		
            </td>
    </tr>

    <tr>
        <td><b><?php echo Rates?></b></td>
        <td style="padding-bottom:8">
    		<textarea style="height:200px; width:90%;" id="PriceBoad" 
            name="PriceBoad"><?php echo $tour["cPriceDayArr"];?></textarea>
        </td>
    </tr>     
    </table>
</fieldset>

</form>

<script language="javascript" type="text/javascript">
function CheckForm(f)
{
	if(f.URL.value=="")
	{
		alert("please enter Url String");
		return false;
	}
	if(f.Name.value=="")
	{
		alert("please enter name");
		return false;
	}
	return AIM.submit(f,null,true);
}
</script>